package cn.fl.carloan.transform;

import java.util.ArrayList;
import java.util.List;

import cn.cmm.base.framework.utils.CollectionUtils;
import cn.fl.carloan.transform.base.BaseOdrWechatpictRecVOTransform;
import cn.fl.carloan.vo.OdrWechatpictRecVO;
import fl.carloan.facade.carloan.dto.OdrWechatpictRecDTO;


/**
 * @Description: 微信画报附件信息表 转换器
 * @Description: VO是客户端传递数据到服务端进行转换的数据 
 * @Description: VO转换数据变成DTO传递到服务端 
 * @Description: VO不能在服务端出现
 */
public class OdrWechatpictRecVOTransform extends BaseOdrWechatpictRecVOTransform {


	/**
	 * DTO 转  VO
	 * @param po OdrWechatpictRecDTO
	 * @return OdrWechatpictRecVO
	 */
	public static OdrWechatpictRecVO toVO(OdrWechatpictRecDTO dto) {
		OdrWechatpictRecVO  vo = baseToVO(dto);
		//设置自定义扩展属性
		return vo;
	}

	/**
	 * VO 转 DTO
	 * @param dto OdrWechatpictRecVO
	 * @return OdrWechatpictRecDTO
	 */
	public static OdrWechatpictRecDTO toDTO(OdrWechatpictRecVO vo) {
		OdrWechatpictRecDTO dto = baseToDTO(vo);
		//设置自定义扩展属性
		return dto;
	}
	
	/**
	 * DTO集合 转 VO集合
	 * @param List<OdrWechatpictRecDTO>
	 * @return List<OdrWechatpictRecVO>
	 */
	public static List<OdrWechatpictRecVO> toVOList(List<OdrWechatpictRecDTO> list) {
		List<OdrWechatpictRecVO>  voList = new ArrayList<OdrWechatpictRecVO>();
		if(CollectionUtils.isNotEmpty(list)){
			for (OdrWechatpictRecDTO dto : list) {
				voList.add(toVO(dto));
			}
		}
		return voList;
	}
	
	/**
	 * VO集合 转 DTO集合
	 * @param list List<OdrWechatpictRecVO>
	 * @return List<OdrWechatpictRecDTO>
	 */
	public static List<OdrWechatpictRecDTO> toDTOList(List<OdrWechatpictRecVO> list) {
		List<OdrWechatpictRecDTO>  dtoList = new ArrayList<OdrWechatpictRecDTO>();
		if(CollectionUtils.isNotEmpty(list)){
			for (OdrWechatpictRecVO vo : list) {
				dtoList.add(toDTO(vo));
			}
		}
		return dtoList;
	}
}
